<%@ include file="/WEB-INF/jsp/taglibs.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>
<%@ page import="sqs.model.*" %>
<%@ page import="java.util.*" %>

<html>
<head>
    <title>
        <spring:message code="qnaireList.heading"/>
    </title>
</head>
<body>
    <blockquote>
        <h1><spring:message code="qnaireList.heading"/></h1>
        <spring:message code="qnaireList.pleaseSelect"/>
        
        <ul>
            <%
                /* Other way:
                List qlist = (List)pageContext.findAttribute("data");
                for(int i=0; i<qlist.size(); i++) {
                    Questionnaire qnaire = (Questionnaire)qlist.get(i);
                    out.println("<li><a href='/sqs/questionnaires/"+qnaire.getQuestionnaireId()+"'>");
                    out.println("<b>"+qnaire.getQuestionnaireTitle()+"</b> - "+qnaire.getDescription()+"</a></li>");
                }
                */
            %>
            
            <c:forEach var="qnaire" items="${data}">
                <li><a href="/sqs/questionnaires/${qnaire.questionnaireId}">
                <b>${qnaire.questionnaireTitle}</b> - ${qnaire.description}</a></li>
            </c:forEach>
        </ul>
        
        <form:form method="post" commandName="questionnaire">
            
        </form:form>
    </blockquote>
    <br><br>
</body>

<%@ include file="/WEB-INF/jsp/footer.jsp" %>
